/**
 * =====================================================================================
 *       @file  ngx_config.h
 *      @brief  
 *
 *  Detailed description starts here.
 *
 *   @internal
 *     Created  2012年05月08日 20时28分39秒 
 *    Revision  1.0.0.0
 *    Compiler  gcc/g++
 *
 *     @author  luis
 * =====================================================================================
 */

#ifndef H_NGX_CONFIG_H_INCLUDE
#define H_NGX_CONFIG_H_INCLUDE

#include <unistd.h>
#include <stdint.h>

#define ngx_signal_helper(n)    SIG##n
#define ngx_signal_value(n)     ngx_signal_helper(n)

#define NGX_SHUTDOWN_SIGNAL     QUIT
#define NGX_TERMINATE_SIGNAL    TERM
#define NGX_NOACCEPT_SIGNAL     WINCH
#define NGX_RECONFIGURE_SIGNAL  HUP
#define NGX_REOPEN_SIGNAL       USR1
#define NGX_CHANGEBIN_SIGNAL    USR2

typedef intptr_t        ngx_int_t;
typedef uintptr_t        ngx_uint_t;      //XXX uintptr_t

#ifndef NGX_ALIGNMENT
#define NGX_ALIGNMENT   sizeof(unsigned long)
#endif

#define ngx_align_ptr(p, a) (u_char *)(((uintptr_t)(p) + ((uintptr_t)a - 1)) & ~((uintptr_t) a - 1))

#endif
